<!DOCTYPE html>
{% load staticfiles %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        .photo{
            margin-top:30px;
            width:140px;
            height:140px;
            float:left;
            border-radius:70px 70px 70px 70px;
            overflow:hidden
        }
        .content{
            margin:60px;
            width:580px;
            float:left;

        }
        .teacher{
            clear:both;
        }

    </style>
</head>
<body>
    <h2>{{ subject.name }}学科老师的信息</h2>
    <hr>
    {% for teacher in teachers %}
    <div class="teacher">
        <div class="photo">
            <img src="{% static teacher.photo %}" width="140px">
        </div>
        <!--  Django模板页，可以使用Django模板语言模板指令来生成动态内容  -->
        <div class="content">
            <p>
                {{ teacher.name }}&nbsp;&nbsp;
                {{teacher.gender | yesno:"男, 女"}}&nbsp;&nbsp;
                {{teacher.birth}}
            </p>
            <p>{{ teacher.intro }}</p>
            <p>
                <a href="/good/?tno={{ teacher.no }}&sno={{ subject.no }}">好评 (<span>{{ teacher.good_count}}</span>)</a>
                <a href="/bad/?tno={{ teacher.no }}&sno={{ subject.no }}">差评 (<span>{{ teacher.bad_count}}</span>)</a>

            </p>
        </div>
    </div>
    {% endfor %}
</body>
</html>